package com.train.daily.api;

import com.train.common.resp.CommonResp;
import com.train.daily.dto.carriage.DailyTrainCarriageQueryListDTO;
import com.train.daily.resp.carriage.DailyTrainCarriageQueryListResp;
import com.train.daily.service.DailyTrainCarriageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class DailyTrainCarriageApiImpl implements DailyTrainCarriageApi {

    @Autowired
    private DailyTrainCarriageService dailyTrainCarriageService;

    @Override
    public CommonResp queryTrainCarriageList(DailyTrainCarriageQueryListDTO dto) {
        List<DailyTrainCarriageQueryListResp> queryListRespList = dailyTrainCarriageService.queryTrainCarriageList(dto);
        return CommonResp.ok(queryListRespList);
    }
}
